#include <bits/stdc++.h>
#include "merge_span.h"
using namespace std;
int main() {
    vector<pair<int,int>>a = {{1,3},{2,6},{8,10},{15,18}};
    vector<pair<int,int>>r;
    r = merge_span(a);
    for(auto i:r)
        cout<<i.first<<" "<<i.second<<"\n";
    return 0;
}
